home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / inptmthd.sit / Input Methods / card_10471.txt < prev    next >
Text File  |  1989-11-24  |  2KB  |  95 lines

  1. -- card: 10471 from stack: in
  2. -- bmap block id: 10724
  3. -- flags: 0000
  4. -- background id: 2696
  5. -- name: Examples
  6. ----- HyperTalk script -----
  7. -- Update the entries in the index field.
  8. on update
  9.   lock screen
  10.   set the cursor to busy
  11.   put empty into list
  12.   push card
  13.   go next
  14.   repeat until the short name of this card is "Variations"
  15.     set the cursor to busy
  16.     get the short name of this card
  17.     if it Γëá last line of list then put it & return after list
  18.     go next
  19.   end repeat
  20.   pop card
  21.   put list into card field "Index"
  22.   set the height of card field "Index" to the number of lines in list * the textHeight of card field "Index" + 4
  23. end update
  24.  
  25.  
  26.  
  27. -- part 1 (field)
  28. -- low flags: 01
  29. -- high flags: 0004
  30. -- rect: left=132 top=75 right=271 bottom=299
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 0
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: Index
  39. ----- HyperTalk script -----
  40.  
  41. -- Simulate menu selection in this field
  42. on mouseDown
  43.   repeat while the mouse is down
  44.     if the mouseLoc is within the rect of me then
  45.       get mouseLine()
  46.       select line it of me
  47.     else select empty
  48.   end repeat
  49.   if the selection is not empty then go to card the selection
  50. end mouseDown
  51.  
  52.  
  53. -- Returns the number of the line the mouse is on in the target field
  54. function mouseLine
  55. put the mouseV - the top of the target into lineNum
  56. if the style of the target = "scrolling"
  57. then add the scroll of the target to lineNum
  58. return lineNum div the textHeight of the target + 1
  59. end mouseLine
  60.  
  61.  
  62.  
  63. -- part 2 (field)
  64. -- low flags: 01
  65. -- high flags: 0000
  66. -- rect: left=11 top=290 right=308 bottom=494
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 0
  70. -- font id: 3
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: 
  75.  
  76.  
  77. -- part contents for card part 1
  78. ----- text -----
  79. Click Single Answer
  80. Click Multiple Answers
  81. Move Objects
  82. Matching
  83. Match Key Objects
  84. Menus
  85. Typing
  86. Single Keypress
  87. Comparison
  88. Expressions
  89. Sound Analysis
  90. Miscellaneous
  91.  
  92.  
  93. -- part contents for card part 2
  94. ----- text -----
  95. Click on a topic, or click the forward arrow to start with the first example.